/*
 *  This file is part of WWWPal.
 *
 *  Copyright (C) 2003  Dr. John Punin, Department of Computer Science
 *  Rensselaer Polytechnic Institute
 *
 *  WWWPal is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  WWWPal is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Foobar; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef REP_GENERAL_H
#define REP_GENERAL_H

#include <gr_graph_fun.h>
#include <sys/stat.h>
#include <sys/fcntl.h>
#include <stdlib.h>
#include <stdio.h>

int 
report_hyperlinks(GraphFrame *gf, char *name_file);

int 
report_webgraph_summary(GraphFrame *gf, char *name_file);

int 
report_pages(GraphFrame *gf, char *name_file);

int 
report_biggest_pages(GraphFrame *gf, char *name_file,int npages);

int 
report_references_pages(GraphFrame *gf, char *name_file,int npages);

int
report_index_of_reports(GraphFrame *gf, char *prename, int nbigpages,
			int nrefpages);


#define GRWString "This Report gives a summary of the Pages and Hyperlinks of the analyzed Web site.\n"

#define RPBLString "This Report gives a List of Pages that contain Broken Links (http code 404). Each page is reported with the broken links and the caption where the broken link is found.\n"

#define RLBLString "This Report gives a List of unique Broken Links (http code 404). Each broken link is reported with the HTML page and the caption where the broken link is found.\n"

#define RLBOString "This Report gives a List of unique Broken Inline Objects (http code 404) such as Images, Applets, etc. Each broken object is reported with the list of HTML pages where the broken object is found.\n"

#define RPWTString "This Report gives a List of HTML pages that do not have title. The Title is the string between &lt;TITLE&gt; &lt;/TITLE&gt; tags.\n"

#define ROPString "This Report gives a  List of Orphan HTML Pages. An orphan page is defined as the HTML page that does not have hyperlinks.\n"

#define RPIAString "This Report gives a  List of Pages that contain Images without the ALT attribute. This ALT attribute is an important one for text based web browser such as lynx.\n"

#define RBPWString "This Report gives a List of Largest Pages (say 20) of a Web Site. The Report contain a list of Largest HTML Pages, Largest non HTML Pages and Largest Inline Objects. The Inline Objects are the ones included inthe HTML page using tags such as IMG, APPLET, EMBED, BACKGROUND, OBJECT.\n"

#define RPHRString "This Report gives a List of Pages with the Highest number of References. The first Table reports HTML Pages with the highest number of hyperlinks. These Hyperlinks are classified as: Hyperlinks to other HTML Pages in the same Web site, Hyperlinks to non HTML pages in the same Website, Hyperlinks to External Pages in a different Web site, Hyperlinksthat are not using HTTP Protocol.  The second Table reports HTML Pagesthat has highest number of references from other HTML Pages in the same Web site. The third Table reports  Non HTML Pages that has the highest number of references from other HTML Pages in the same Web site. The fourth Table reports the Inline Objects (such as GIF's) that has the highest number of references from other HTML pages in the same Web site.\n"

#define RMRPString "This Report gives a List of the Most Requested Pages (say 20) of a Web Site. This Report contains a list of the Most Requested HTML Pages, Most Requested non HTML Pages and Most Requested Inline Objects. The Inline Objects are the ones included in the HTML page using tags such as IMG, APPLET, EMBED, BACKGROUND, OBJECT.\n"

#define RMRPString2 "This Report gives a List of the Most Requested Pages (say 20) of a Web Site. This Report contains a list of the Most Requested HTML Pages and Most Requested non HTML Pages .\n"

#define RSMAString "This Report gives a List of Sites with the Most Access Count (say 20) of a Web Site. This Report contains a list of the local sites and a list of the external sites with the most access count.The Percentage Access Count is related to the total number of hits of a Web Site. This report gives also the number of HTML Pages requested , the number of Bytes Transferred and the percentage related to the total number of Bytes Transferred in a Web Site\n"

#define RDNMAString "This Report gives a List of Domains with the Most Access Count (say 20) of a Web Site. The Percentage Access Count is related to the total number of hits of a Web Site. This report gives also the number of HTML Pages requested , the number of Bytes  Transferred and the percentage related to the total number of Bytes Transferred in a Web Site\n"

#define RDMAString "This Report gives a List of the Directories with the Most Access Count (say 20) of a Web Site. The Percentage Access Count is related to the total number of hits of a Web Site. The total access count is the total number of hits to the pages in that directory and all directories under that directory. This report gives also the number of Bytes Transferred and the percentage related to the total number of Bytes Transferred in a Web Site\n"

#define RMVHString "This Report gives a List of the Most Visited Hyperlinks (say 20) of a Web Site. The Hyperlink is reported as the Triplet: Referer, Caption, Target. The Referer is the URL of the HTML page that contains the Hyperlink, the Caption is the anchor text where the Hyperlink is located and the Target is the URL of the page where the Hyperlink is linked to. The Percentage is related to the total number of requests\n"

#define RMVSHString "This Report gives a List of the Most Visited Hyperlinks (say 20) of a Web Site. The Hyperlink is reported as the Triplet: Referer, Caption, Target. The Referer is the URL of the HTML page that contains the Hyperlink, the Caption is the anchor text where the Hyperlink is located and the Target is the URL of the page where the Hyperlink is linked to. Two lists are reported: Hyperlinks between HTML Pages, and Hyperlinks between HTML Pages and Non HTML Pages. The Percentage is related to the total number of requests\n"

#define RMVIHString "This Report gives a List of the Most Visited Independent Hyperlinks (say 20) of a Web Site. An Independent Hyperlink is the Hyperlink between independent pages, or between an independent page and a non independent page. The Independent Hyperlink is reported as Referer and Target. The Referer is the URL of the HTML page that contains the Hyperlink, the Target is the URL of the page where the Hyperlink is linked to. Two lists are reported: Independent Hyperlinks between HTML Pages, and Independent Hyperlinks between HTML Pages and Non HTML Pages. The Percentage is related to the total number of requests\n"

#define RMVBLString "This Report gives a List of the Most Visited Broken Links (say 20) of a Web Site. A Broken Link is the Hyperlink between an HTML page and non existent page. We also report here links to forbidden pages. The Broken Link is reported as Referer and Target. The Referer is the URL of the HTML page that contains the Hyperlink, the Target is the URL of the page where the Hyperlink is linked to. Three lists are reported: List of Broken Links, Links of Independent Broken Links and Links of External Broken Links. The Percentage is related to the total number of requests. An HTTP Code of 404 means that the target of the link is a non existent page. An HTTP Code of 403 means that the target of the links is a forbidden page. \n"

#define RMVIPString "This Report gives a List of the Most Visited Independent Pages (say 20) of a Web Site. The Independent Pages are the ones that are not accessible from the root page of a Web Site. This Report contains a list of the most visited HTML Independent Pages and a list of the most visited Non HTML Independent Pages. The size of the Independent Page is reported. The Percentage is related to the total number of requests\n"

#define RBAString  "This Report gives a List of Browsers with the Most Access Count (say 20) of a Web Site. The Percentage Access Count is related to the total number of hits of a Web Site. This report gives also the number of Bytes Transferred and the percentage related to the total number of Bytes Transferred in a Web Site. This report contains four lists: Browser Class (different versions of Netscape, Internet Explorer and Others), Platforms (different version of Windows, Unix and Others), Spiders with the most access count and Specific Browsers with the most access count.\n"

#define RMVEPString "This Report gives a List of the Most Requested Entry Pages (say 20) of a Web Site. The Entry Pages are the ones that are first visited when a user enters the Web Site. The Entry hits of a page is lower than the total number of hits of that page. The Entry hits are divided into the following fields : No Referer, Static Referer and Dynamic Referer. When a user accesses a page typing the url in a Web Browser, there is no referer to that page. When a user accesses a page thru a hyperlink in a external web page, the referer is called Static Referer. If the user access a page using a search engine, the referer is called Dynamic Referer. This report contains the number of No Referer, Static Referer and Dynamic Referer Hits. The Percentage is the Entry hits of the page related to the total number of requests. The size of the page is also reported\n"

#define RTHRString "This Report gives a Top List of Host and Search Engine with the highest number of referers (say 20) of a Web Site. The Percentage Access Count is related to the total number of hits of a Web Site. This report gives also the number of Bytes Transferred and the percentage related to the total number of Bytes Transferred in a Web Site\n"

#define RTURString "This Report gives a Top List of the URL Referers (say 20) of a Web Site. The URL referers can be external or internal of a Web Site. This report contains two lists, one with the top external URL referers and the other with the top internal URL referers. The external referers are reported with the target that is the URL of the page where the hyperlink is linked to. The internal referers are not reported with the targets. The Percentage is related to the total number of requests\n"

#define RTKString "This Report gives a Top List of the Searching Keywords (say 20). The keywords can be found in the url referer of the search engines. They are appended to the url after the '?' character. This report also contains the top keywords for the most popular search engines that access a web site. The Percentage is related to the total number of searches.\n"

#define RSDString "This Report gives a brief statistic of a usage of a Web Site during a time period. This report contains three lists : Statistics by Month, Statistics by Day and Statistics by Hour. The number of hits, the number of HTML pages requested and the size of Kilobytes downloaded are reported for each Statistic list. \n"

#define RMVGString "This Report gives a List of the Graphs with most User Sessions (say 20) of a Web Site. A User session is counted when a User navigates through the Web Site at least clicking in one hyperlink. The Graph is constructed with the Web Pages (nodes) and Hyperlinks (edges) that the User visited during the Session. The reported graphs have a given minimum number of edges. If the given minimum number of edges is 2, all the reported graphs are the ones that have at least 2 edges. The Graph is reported as a list of Hyperlinks (Referer and Target). The Referer is the URL of the HTML page that contains the Hyperlink, and the Target is the URL of the page where the Hyperlink is linked to.\n"

#define RMVUString "This Report gives a List of the Users with the longest Sessions (say 20) of a Web Site. A User session is counted when a User navigates through the Web Site at least clicking in one hyperlink. The Graph is constructed with the Web Pages (nodes) and Hyperlinks (edges) that the User visited during the Session. The reported Graphs have a given maximum number of edges. If the given maximum number of edges is 20, all the reported graphs are the ones that have at most 20 edges. The First Referer and the Entry Page are reported followed by the Graph and the number of Requests. The Graph is reported as a list of Hyperlinks (Referer and Target). The Referer is the URL of the HTML page that contains the Hyperlink, and the Target is the URL of the page where the Hyperlink is linked to.\n"

#endif





